Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web-api: basic module system integration tests, removing unused bits, dependency updates #1724

Merged
merged 5 commits into from Jan 16, 2024

Conversation

filmaj
Copy link
Contributor

@filmaj filmaj commented Jan 16, 2024

Summary

Fixes #1679 .

In prep for web-api v7 release, doing some cleanup and dependency updates, specifically:

  • removed old deno shim bits that are no longer needed
  • added two 'integration' tests under test/integration: one for a CommonJS-based project and one for an ESM-based project, ensuring that no matter which module system is used, web-api is compatible with it. By changing the type field within package.json and/or modifying the tsconfig.json compilerOptions, the code emitted for distribution may or may not be compatible with each style of project. These integration tests ensure compatibility with both.
  • Updating the typescript dependency to the latest version. Locking to a specific version as typescript notoriously introduces breaking changes in minor and patch releases.
  • Simplifying tsconfig.json and re-using the 'recommended' tsconfig base as much as possible.
  • Updated sinon to latest major version
  • Removed capture-console dev dependency, can use sinon for the same functionality.

@filmaj filmaj added semver:major enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` labels Jan 16, 2024
@filmaj filmaj added this to the web-api@7.0 milestone Jan 16, 2024
@filmaj filmaj self-assigned this Jan 16, 2024
…or them, updated Busboy usage in tests to latest documented API.
@filmaj filmaj marked this pull request as ready for review January 16, 2024 17:47
@filmaj filmaj requested a review from a team January 16, 2024 17:47
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM all around! Great to see the checks for both CJS and ESM 🎉

process.exit(1);
} catch (e) {
assert(e.message.includes('invalid_auth'), '❌ Did not receive expected "invalid_auth" response from `auth.test` API, ESM project integration test failed.');
console.log('✅ ESM project integration test succeeded!');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

},
"extends": "@tsconfig/recommended/tsconfig.json",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 🙌

"typescript": "^4.1"
"ts-node": "^10",
"tsd": "^0.30.0",
"typescript": "5.3.3"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒🔒🔒🔒🔒.3.3 👍 Happy to remove breaking builds from this!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Farewell, deno-shims/buffer-shim.js 👋 😔

@filmaj filmaj merged commit 5fe33e5 into main Jan 16, 2024
15 checks passed
@filmaj filmaj deleted the clean-trim-prune-update branch January 16, 2024 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality pkg:web-api applies to `@slack/web-api` semver:major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run an export / type / interface usage analysis, prune what is no longer needed
2 participants